package com.dfbz.demo01;

import java.util.Random;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo01_Random的用法 {
    public static void main(String[] args) {

        // 创建一个随机数
        Random random=new Random();

        /*for (int i = 0; i < 10000; i++) {
            System.out.println(random.nextDouble());
        }
*/
/*        for (int i = 0; i < 10000; i++) {
            System.out.println(random.nextInt());
        }*/

        for (int i = 0; i < 10000; i++) {
            System.out.println(random.nextInt(10));

        }
    }
}
